<template>
	<view class="list-wrap">
		<view class="list-item" v-if="obtProductListLen" v-for="item in ProductList" :key="item.id">
			<navigator :url="`/pages/Page_ProductDetails/Page_ProductDetails?pid=${item.id}`">
				<image class="product-preview" :src="item.list_pic_url" mode="widthFix" />
				<view class="product-info">
					<view class="product-info-title">{{item.name}}</view>
					<view class="product-info-price">
						<text v-if="item.retail_price" class="sale-price"><text class="unit">￥</text>{{AmountCalculation(item.retail_price,2)}}</text>
						<text v-if="item.OriginalPrice" class="original-price">原价：{{AmountCalculation(item.OriginalPrice,2)}}</text>
					</view>
					<view class="product-info-supple">
						<text v-if="item.Category" class="category">{{item.Category}}</text>
						<text v-if="item.DailySales" class="dailysales">销量：{{item.DailySales}}</text>
					</view>
				</view>
			</navigator>
		</view>
		<view class="no-data" v-else>暂无数据</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		props:{
			ProductList:{
				type:Array,
				required:true,
				default:[]
			}
		},
		computed: {
			//取出备注名称
			obtProductListLen: function() {
				return this.ProductList.length||0;
			},
		},
	}
</script>

<style lang="less" scoped>
  @import "./Comp_ProductList.less";
</style>
